package com.lms.service.impl;

import com.lms.mapper.TeachevalbaseinfoMapper;
import com.lms.service.TeachevalbaseinfoService;
import com.lms.vo.TeachEvalBaseInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 教学评估基础数据业务逻辑层接口实现类
 * @author: L-B-S
 * @Date: 2021/3/7 16:05
 * @modified_By:
 * @Version: 0.0$
 */
@Service
public class TeachevalbaseinfoServiceImpl implements TeachevalbaseinfoService {

    @Autowired
    private TeachevalbaseinfoMapper teachevalbaseinfoMapper;

    @Override
    public TeachEvalBaseInfoVo tebiList() {
        TeachEvalBaseInfoVo teachEvalBaseInfoVo = new TeachEvalBaseInfoVo();

        List<String> locations = teachevalbaseinfoMapper.selectLocations();
        locations.add(0, "校区");
        teachEvalBaseInfoVo.setLocations(locations);

        List<Object> aveStuAreas = teachevalbaseinfoMapper.selectAveStuAreas();
        aveStuAreas.add(0, "生均占地面积(㎡)");
        teachEvalBaseInfoVo.setAveStuAreas(aveStuAreas);

        List<Object> aveStuStayAreas = teachevalbaseinfoMapper.selectAveStuStayAreas();
        aveStuStayAreas.add(0, "生均数组面积(㎡)");
        teachEvalBaseInfoVo.setAveStuStayAreas(aveStuStayAreas);

        List<Object> hunStuSeatNums = teachevalbaseinfoMapper.selectHunStuSeatNums();
        hunStuSeatNums.add(0, "百名学生配教室座位数");
        teachEvalBaseInfoVo.setHunStuSeatNums(hunStuSeatNums);

        List<Object> hunStuDineNums = teachevalbaseinfoMapper.selectHunStuDineNums();
        hunStuDineNums.add(0, "百名学生配食堂座位数");
        teachEvalBaseInfoVo.setHunStuDineNums(hunStuDineNums);

        return teachEvalBaseInfoVo;
    }
}
